import Vue from 'vue'
import ElementUI from 'element-ui'
import ECharts from 'vue-echarts'
import Hljs from 'highlight.js/lib/core'
window.hljs = Hljs
require('highlightjs-line-numbers.js')
import cpp from 'highlight.js/lib/languages/cpp'
import 'highlight.js/styles/dracula.css'
hljs.registerLanguage('cpp', cpp)

import '~/css/app.scss'
import App from './App.vue'
import MenuItem from '~/components/MenuItem'
import Menu from '~/components/Menu'
import router from '~/router'
import Dialog from '~/components/Dialog'
import FullWidthButton from '~/components/FullWidthButton'
import Page from '~/components/Page'
import VideoPlayer from '~/components/VideoPlayer'
import VideoPlayerPage from '~/components/VideoPlayerPage'
import AlgorithmVisualizerPage from '~/components/AlgorithmVisualizerPage'
import CodeDisplay from '~/components/CodeDisplay'
import CodeNotePage from '~/components/CodeNotePage'
import Info from '~/components/Info'
import Question from '~/components/Question'

Vue.use(ElementUI)

Vue.use(hljs.vuePlugin)
Vue.component('v-chart', ECharts)
Vue.component('video-player', VideoPlayer)
Vue.component('video-player-page', VideoPlayerPage)
Vue.component('full-width-button', FullWidthButton)

Vue.component('page', Page)
Vue.component('v-dialog', Dialog)
Vue.component('v-menu-item', MenuItem)
Vue.component('v-menu', Menu)
Vue.component('algorithm-visualizer-page', AlgorithmVisualizerPage)
Vue.component('code-display', CodeDisplay)
Vue.component('code-note-page', CodeNotePage)
Vue.component('info', Info)
Vue.component('v-question', Question)

new Vue({
  el: '#app',
  router,
})
